<% layout('/layouts/default.html', {title: '修改排序编号', libs: ['validate']}){ %>
<div class="main-content">
    <div class="box box-main">
        <#form:form id="inputForm" model="${queryEntity}" action="${ctx}/query/ComPreHenceQuery/changeSortNum" method="post" class="form-horizontal">
        <div class="box-body" style="height: 177px;">
            <#form:hidden path="taskId"/>
            <div class="row">
                <div class="col-xs-12">
                    <div class="form-group">
                        <label class="control-label col-sm-2" title="">
                            <span class="required hide">*</span> ${text('任务标题')}：<i class="fa icon-question hide"></i></label>
                        <div class="col-sm-10">
                            <label class="control-label" style="text-align: left">${queryEntity.taskTitle}</label>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-xs-12">
                    <div class="form-group">
                        <label class="control-label col-sm-2" title="">
                            <span class="required hide">*</span> ${text('排序编号')}：<i class="fa icon-question hide"></i></label>
                        <div class="col-sm-10">
                            <#form:input path="sortNum" maxlength="10" min="1" class="form-control digits" placeholder="请输入排序编号" autocomplete="off"/>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="box-footer">
            <div class="row" style="text-align: right;">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i class="fa fa-check"></i> ${text('确 定')}</button>&nbsp;
                    <button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="js.closeCurrentTabPage()"><i class="fa fa-reply-all"></i> ${text('关 闭')}</button>
                </div>
            </div>
        </div>
    </#form:form>
</div>
</div>
<% } %>
<script>
    $("#inputForm").validate({
        submitHandler: function(form){
            js.ajaxSubmitForm($(form), function(data){
                js.showMessage(data.message);
                if(data.result == Global.TRUE){
                    js.closeCurrentTabPage(function(contentWindow){
                        contentWindow.page();
                    });
                }
            }, "json");
        }
    });
</script>